﻿// DuiViewer.cpp : 定义应用程序的入口点。
//

#include "stdafx.h"
#include "ViewerMainWindow.h"




int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
                     _In_opt_ HINSTANCE hPrevInstance,
                     _In_ LPWSTR    lpCmdLine,
                     _In_ int       nCmdShow)
{
	HRESULT Hr = ::CoInitialize(NULL);
	if (FAILED(Hr))
	{
		return 0;
	}

	// 初始化UI管理器
	CPaintManagerUI::SetInstance(hInstance);

	ViewerMainWindow* pFrame = ViewerMainWindow::InstancePtr(); //new ViewerMainWindow();
	if (pFrame == NULL)
	{
		return 0;
	}

	pFrame->InitResource();
	pFrame->Create(NULL, _T("DuiViewer"), UI_WNDSTYLE_FRAME, 0L, 0, 0, 990, 690);
	pFrame->CenterWindow();
	pFrame->ShowModal();

	CPaintManagerUI::MessageLoop();

	::CoUninitialize();
	return 0;
}
